package net.osin.playscalajs.TwoWayBinding

import com.thoughtworks.binding.Binding
import com.thoughtworks.binding.Binding.Var
import org.lrng.binding.html
import org.scalajs.dom.html.{Div, Input}
import org.scalajs.dom.raw.Event

object View
{
  @html
  def render():Binding[Div] = {
    val input = Var("")
    <div>
      <input oninput={ event: Event => input.value= event.currentTarget.asInstanceOf[Input].value }/>
      Your input value is { input.bind }
    </div>
  }
}
